import sys
import logging
import time
import asyncio
from kuai_log import get_logger

from .async_pool_executor import AsyncPoolExecutor

logger = get_logger(
    name="test",
    level=logging.DEBUG,
    log_filename="t5.log",
    log_path="/pythonlogs",
    is_add_file_handler=True,
    json_log_path="/python_logs_json",
    is_add_json_file_handler=True,
)


if __name__ == "__main__":
    print(sys.path)

# async def async_f(x):
#     await asyncio.sleep(2)
#     for i in range(10):
#         # logger.info(x)
#         print(x)
#         # logger.debug(i)
#         # logger.info(i)
#         # logger.warning(i)
#         # logger.error(i)
#         # logger.critical(i)


# t_start = time.time()
# pool = AsyncPoolExecutor(3)
# for i in range(30):
#     pool.submit(async_f, i)
# print(time.time() - t_start)
